-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
expected_np = _np.copysign(a1_np, a2_np) | ||
with mx.autograd.record(): | ||
mx_out = test_copysign(a1, a2) | ||
assert mx_out.shape == expected_np.shape |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test if mx_out.dtype matches expected_np.dtype. I think we can later add a utility to match the shape + dtype.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore my previous comments. I think we'd better check the return types after we support arbitrary dtype combinations in deepnumpy. So it's okay to not check the return types now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that in the future we should do it, after more dtypes and casting is supported.
* add numpy compatible copysign * fix scalar op registration error * add test
Description
Numpy compatible copysign
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments